package com.kly.chatter.db.dao.impl;
import com.fqgj.common.base.AbstractBaseMapper;
import com.fqgj.common.base.BaseMapper;
import com.google.common.collect.Maps;
import com.kly.chatter.db.dao.ChatterWeekStatusDao;
import com.kly.chatter.db.entity.ChatterWeekStatusEntity;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.HashMap;

/**
* User: a
* Date: 2023-10-07
* Time: 15:45:35.010
*/

@Repository
public class ChatterWeekStatusDaoImpl extends AbstractBaseMapper<ChatterWeekStatusEntity> implements ChatterWeekStatusDao {

    @Override
    public ChatterWeekStatusEntity getWeekStatus(String userCode, Integer today) {
        final HashMap<String, Object> params = Maps.newHashMap();
        params.put("chatterCode", userCode);
        params.put("today", today);
        return this.getSqlSession().selectOne(this.getStatement("getWeekStatus"), params);
    }

    @Override
    public ChatterWeekStatusEntity getWeekStatusByTodayTime(String userCode, Integer todayTime) {
        final HashMap<String, Object> params = Maps.newHashMap();
        params.put("chatterCode", userCode);
        params.put("todayTime", todayTime);
        return this.getSqlSession().selectOne(this.getStatement("getWeekStatusByTodayTime"), params);
    }


}